/*
 * BaseConceptType.java
 *
 * Created on 3 April 2007, 12:03
 *
 */

package rxtokenizer;

/**
 * Class has base fields for other inherited classes.
 * @author Ruslan Fayzrakhmanov
 */
public class BaseConceptType {
    
    BaseConceptType(String name, String originalExtractingExp) {
        this.name = name;
        this.originalExtractingExp = originalExtractingExp;
        this.description = "";
	constraintExtractingExp = "";
    }
    
    BaseConceptType(String name, String originalExtractingExp, String description) {
        this.name = name;
        this.originalExtractingExp = originalExtractingExp;
        this.description = description;
	constraintExtractingExp = "";
    }
    
    BaseConceptType(String name, String originalExtractingExp, String constraintExtractingExp, String description) {
        this.name = name;
        this.originalExtractingExp = originalExtractingExp;
	this.constraintExtractingExp = constraintExtractingExp;
        this.description = description;
    }
    
    public final String getName() {
        return name;
    }
    
    public final String getOriginalExtractingExp() {
        return originalExtractingExp;
    }
    
    public final String getConstraintExtractingExp() {
        return constraintExtractingExp;
    }

    public final String getDescription() {
        return description;
    }
    
    public ConceptTypeStruct getStruct() {
	return new ConceptTypeStruct(name, originalExtractingExp, constraintExtractingExp, description);
    }
	    
    public String toString() {
	return "name = "+name+"\nconstraintExtractingExp = "+constraintExtractingExp+"\noriginalExtractingExp = "+originalExtractingExp+"\ndescription = "+description+'\n';
    }
    
	/**
	 * Name of the concept type.
	 */
    protected String name;
	/**
	 * Constraint for extracted concept.
	 */
    protected String constraintExtractingExp;
	/**
	 * Original string for extracting concepts.
	 */
    protected String originalExtractingExp;
	/**
	 * Description of the concept type.
	 */
    protected String description;
}
